Geospatial Data Analytics on AWS by Scott Bateman & Janahan Gnanachandran & Jeff DeMuth

Geospatial Data Analytics on AWS by Scott Bateman & Janahan Gnanachandran & Jeff DeMuth

Author:Scott Bateman & Janahan Gnanachandran & Jeff DeMuth
Language: eng
Format: epub
Publisher: Packt
Published: 2023-11-15T00:00:00+00:00


Spatial query structure

Performing any kind of query on geospatial data that interrogates the location information of the geometry can be referred to as a spatial query. Spatial queries unlock new opportunities and threats by adding the context of where the data exists. Not only can you determine where a particular feature sits on Earth but you can also find out what that feature is close to, contained within, or related to.

Spatial queries follow the similar SQL format of attribute queries but gain location awareness. When working with geospatial data, it is important to always know the coordinate reference system of your data. The coordinate system can be specified as an argument when converting latitude and longitude into a point geometry. Knowing the correct reference system will ensure that your location accuracy is maintained throughout conversions and transformations.

A common example of where spatial queries can provide unique insights can be seen with the ST_Contains spatial function. This built-in function allows you to find out whether or not one geometry is contained within the boundaries of another. This function will return true if the second argument is completely contained within the boundary of the first argument. This functionality can be combined with a join of two spatial datasets, as shown here, to determine which earthquakes occurred in Kern County, California:

SELECT counties.name, earthquakes.earthquake_date, earthquakes.magnitude, earthquakes.latitude, earthquakes.longitude FROM counties CROSS JOIN earthquakes WHERE ST_CONTAINS (ST_GeomFromLegacyBinary(counties.boundaryshape), ST_POINT(earthquakes.longitude, earthquakes.latitude)) AND counties.name = 'Kern'

This results in the following output:



Download



Copyright Disclaimer:
This site does not store any files on its server. We only index and link to content provided by other sites. Please contact the content providers to delete copyright contents if any and email us, we'll remove relevant links or contents immediately.
Popular ebooks
Developing Robust Date and Time Oriented Applications in Oracle Cloud by Michal Kvet(6819)
Practical Guide to Azure Cognitive Services by Chris Seferlis & Christopher Nellis & Andy Roberts(5947)
Unity Artificial Intelligence Programming - Fifth Edition by Dr. Davide Aversa(5546)
Serverless ETL and Analytics with AWS Glue by Vishal Pathak Subramanya Vajiraya Noritaka Sekiyama Tomohiro Tanaka Albert Quiroga Ishan Gaur(4697)
Open Source Projects - Beyond Code by John Mertic(3771)
The AI Product Manager's Handbook by Irene Bratsis(3743)
Graph Data Modeling in Python by Gary Hutson and Matt Jackson(3739)
Cloud Auditing Best Practices by Shinesa Cambric & Michael Ratemo(3362)
Aligning Security Operations with the MITRE ATT&CK Framework by Rebecca Blair(3337)
Graph Data Processing with Cypher by Anthapu Ravindranatha;(1537)
Data Literacy in Practice - A complete guide to data literacy and making smarter decisions with data through intelligent actions (2022) by Packt(1516)
Serverless Machine Learning with Amazon Redshift ML: Create, train, and deploy machine learning models using familiar SQL commands by Debu Panda Phil Bates Bhanu Pittampally Sumeet Joshi(1418)
Network Automation with Go by Nicolas Leiva & Michael Kashin(1367)
Data Literacy in Practice by Angelika Klidas Kevin Hanegan(1305)
Applied Machine Learning and High-Performance Computing on AWS by Mani Khanuja | Farooq Sabir | Shreyas Subramanian | Trenton Potgieter(1303)
Graph Data Processing with Cypher by Ravindranatha Anthapu(1292)
Unreal Engine 5 Game Development with C++ Scripting by Zhenyu George Li(1168)
Implementing Multifactor Authentication: Protect your applications from cyberattacks with the help of MFA by Marco Fanti(1163)
Fuzzing Against the Machine: Automate vulnerability research with emulated IoT devices on QEMU by Antonio Nappa Eduardo Blazquez(1157)
The AI Product Manager's Handbook: Develop a product that takes advantage of machine learning to solve AI problems by Irene Bratsis(1015)